#ifndef _EVENT_MANAGER_H_
#define _EVENT_MANAGER_H_

#include "../../container/vector/Vector.h"
#include "../listener/Listener.h"
#include "../event/Event.h"

/*
	class : EventManager
	desc : Used to manage and run events
		there should be only one for
		the most part ever declared.
*/
class EventManager
{
	private : 
		//stack of events and registered listeners that have occurred
		static Vector<Listener> eventStack;
		//list of registered events
		static Vector<Event> events;
		//list of registered listeners for registered events.
		static Vector<Listener> listeners;
	public:
		//default constructor
		EventManager();
		//adds a listener to the event manager.
		void add(Listener listener);
		//registers an event with the eventmanager.
		void registerEvent(Event e);
		//registers a callback with the event manager.
		//this uses the driver interface for events.
		void registerCallback(Event e, Driver l);
		//runs the events that need to be run
		//and pops them off the stack.
		void runEvent()
	
};


//stack of events and registered listeners that have occurred
Vector<Listener> EventManager::eventStack = Vector<Listener>();
//list of registered events
Vector<Event> EventManager::events = Vector<Event>();
//list of registered listeners for registered events.
Vector<Listener> EventManager::listeners = Vector<Listener>();

#endif
